//////////////////////////////////////////////////////
// Interpolls Banner Unit
// Size: 300x250
// Type: in-page
// Base: 1.2
// Category: Media & Entertainment, Theatrical
// 
// Copyright (c) 2011 Interpolls All rights reserved.
//
var cmp_dirzti = "tmobile/springrefresh2011p2";
var cmp_sizezti = "300";
var cmp_idzti = cmp_dirzti+"/"+cmp_sizezti;
var _ipGObjzti = window.ipollGObj_2_261;
var adPanelIdzti = _ipGObjzti[cmp_idzti];
var adUIDzti = adPanelIdzti.queue.pop();
var adObjzti = adPanelIdzti[adUIDzti];
adObjzti.adUid = adUIDzti;
adObjzti.cmp_dir = cmp_dirzti;
adObjzti.cmp_size = cmp_sizezti;
adObjzti.adInstStr = "window.ipollGObj_2_261['"+cmp_idzti+"']."+adUIDzti;
adObjzti.rndStr = Math.random()*1000000000000000000+"";
adObjzti.tday = typeof ipoll_dateSwitch != 'undefined' ? new Date(ipoll_dateSwitch) : new Date();
if (isNaN(parseInt(adObjzti.c))) { adObjzti.c = 19; } else { adObjzti.c = parseInt(adObjzti.c); }
adObjzti.panelNo = _ipGObjzti.browser.is_valid?1:15;

adObjzti.i = 62355; /* General URL */
adObjzti.i2 = 62357; /* Store Locator */
adObjzti.i3 = 62356; /* Learn More */


adObjzti.es2="http://ad.doubleclick.net/ad/N3671.AOL/B5557163.22;sz=1x1;pc=[TPAS_ID];ord=";
adObjzti.locator="http://ad.doubleclick.net/clk;242811416;65708827;l;pc=[TPAS_ID]";
adObjzti.targeturl="http://ad.doubleclick.net/clk;242811318;65708827;m;pc=[TPAS_ID]";
if (adObjzti.link_g.length>15) {
	adObjzti.targeturl = adObjzti.link2+adObjzti.link_g+escape(adObjzti.targeturl);
	adObjzti.locator = adObjzti.link2+adObjzti.link_g+escape(adObjzti.locator);
} else {
	adObjzti.targeturl = adObjzti.link2+adObjzti.link_y+adObjzti.targeturl;
	adObjzti.locator = adObjzti.link2+adObjzti.link_y+adObjzti.locator;
}adObjzti.questionStr="T-Mobile - 2011 Spring Refresh - 300x250 - 1 - ztk - do not mark live.";
adObjzti.choiceStr = new Array(); adObjzti.choiceStr[0] = "ans1"; adObjzti.choiceStr[1] = "ans2";
adObjzti.isPoll=1;
adObjzti.a=71240;
adObjzti.p=143396;// ------- Config specific fixes -------
adObjzti.marginAuto = true;
if (window.location.href.indexOf("imdb.com")>-1) { adObjzti.marginAuto = false; }
//if (window.location.href.indexOf("")>-1) { adObjzti.hideIframe = true; }
//if (window.location.href.indexOf("")>-1) { adObjzti.envSty = ""; }
if (adObjzti.c >= 410 && adObjzti.c <= 422) { adObjzti.disableTS = true; }
if (adObjzti.c == 465) { adObjzti.disableTS = true; }
// ------- Begin Div and Layout Vars ------
adObjzti.impDivName = "impIpoll"+adObjzti.adUid; 
adObjzti.flashName = "flash"+adObjzti.adUid;
adObjzti.envDivName = "envIpoll"+adObjzti.adUid;
adObjzti.envSize = [300,250];
adObjzti.replDivName = "replIpoll"+adObjzti.adUid;
// ------- End Div and Layout Vars ------

// ------- Begin Creative Vars -------
var ipollDocDomain; try { ipollDocDomain=document.location.host; } catch (e) { } if (ipollDocDomain.length > 6) { ipollDocDomain="&inD="+ipollDocDomain; } else { ipollDocDomain = ""; }
//Shopzilla
if(adObjzti.a == 71241){
	adObjzti.flashPath = "b/f/1cjo.swf"; 
}else{
	adObjzti.flashPath = "7/b/1cjn.swf"; 
}	

adObjzti.replPath = "6/6/1ck7.jpg";
adObjzti.replClickEvent = 1;
adObjzti.flashSource=_ipGObjzti.util.crUrl+adObjzti.flashPath+"?inCDN=InterpollsAkamai&inA="+adObjzti.a+"&inC="+adObjzti.c+"&inP=1"+ipollDocDomain+"&inUid="+adObjzti.adInstStr;
adObjzti.flashTargetBase=_ipGObjzti.util.swDom+"redir.poll?c="+adObjzti.c+"&p="+adObjzti.p+"&i=";
adObjzti.flashTarget="ipollTarget1="+escape(adObjzti.flashTargetBase+adObjzti.i+"&t="+escape(adObjzti.bumper+adObjzti.targeturl));
adObjzti.flashTarget+="&ipollTarget2="+escape(adObjzti.flashTargetBase+adObjzti.i2+"&t="+escape(adObjzti.bumper+adObjzti.locator));
adObjzti.flashTarget+="&ipollTarget3="+escape(adObjzti.flashTargetBase+adObjzti.i3+"&t="+escape(adObjzti.bumper+adObjzti.targeturl));
// ------- End Creative Vars -------

// ------- Begin Common Styles -------
adObjzti.defaultSty = ""
	+ " margin:0px!important;"
	+ " padding:0px!important;"
	+ " background:none!important;"
	+ " border:0px!important;"
	+ " border-collapse:collapse!important;"
	+ " border-spacing:0px!important;"
	+ " list-style:none!important;";	
adObjzti.imgSty = ""
	+ " display:block!important;"
	+ " vertical-align:baseline!important;"
	+ adObjzti.defaultSty;
// ------- End Common Styles -------

// ------- Begin Load and Utils Functions ------
adObjzti.delayLoad = function () { 
	if (this.delayLoadLock) return;
	this.delayLoadLock=true;
	if (_ipGObjzti.util.isLoaded()) {
		if (this.delayLoadTimer) clearInterval(this.delayLoadTimer);
		if (_ipGObjzti.browser.is_mac && _ipGObjzti.browser.is_firefox) {this.ffMacMouseFix(this.flashName);}
		if (this.studyTrk) { this.appendJavascriptObj(this.studyTrk,this.envDivName); }
		if (this.hideIframe) { if(this.iframe) { this.iframe.style.display="none"; }}
	}
	this.delayLoadLock=false;
	return;
}
adObjzti.delayLoadTimer = function() {this.delayLoadTimer = setInterval(this.adInstStr+".delayLoad()",100);}
adObjzti.appendJavascriptObj = function(jsrc,appendTo) {
	if (_ipGObjzti.util.getObj(appendTo)) {
		var jObj=document.createElement("SCRIPT");
		jObj.setAttribute("type","text/javascript");
		jObj.setAttribute("src",jsrc);
		appendTo = _ipGObjzti.util.getObj(appendTo);
		appendTo.appendChild(jObj);
	}
	return;
}
adObjzti.isMouseLeaveOrEnter = function (e, handler) {
	if (e.type !== 'mouseout' && e.type !== 'mouseover') return;
	var reltg = e.relatedTarget ? e.relatedTarget :	e.type === 'mouseout' ? e.toElement : e.fromElement;
	while (reltg && reltg !== handler) reltg = reltg.parentNode;
	return (reltg !== handler);
}
adObjzti.checkMouse = function (e, handler) {
	if (this.isMouseLeaveOrEnter(e, handler)) {
		if(e.type === 'mouseout') {
			this.mouse = 0;
			this.stopTimeSpent(0);
		} else {
			this.mouse = 1;
			this.startTimeSpent(0);
		}
	}
}
adObjzti.ffMacMouseFix = function(flashName) { 
	var flObj = _ipGObjzti.util.findFlashObj(flashName); 
	if (flObj) {
		var ipParent = flObj.parentNode;
        while (ipParent && ipParent.parentNode.id.indexOf(this.adUid) != -1) { ipParent = ipParent.parentNode; }
        flObj.setAttribute("onmouseover",this.adInstStr+".checkMouse(event,'"+ipParent.id+"');"); 
		flObj.setAttribute("onmouseout",this.adInstStr+".checkMouse(event,'"+ipParent.id+"');"); 
	}
}
adObjzti.liveTracker = function(evt) {}
adObjzti.replClick = function(evt,imageId,targetUrl) {
	_ipGObjzti.util.evtTrk(this, this.a, this.c, this.panelNo, evt);
	_ipGObjzti.util.loadTrk(_ipGObjzti.util.swDom+"redir.poll?c="+this.c+"&p="+this.p+"&i="+imageId+"&t="+_ipGObjzti.util.spUrl+"?");
	this.oobClkTrk();
	window.open(this.bumper ? this.bumper + escape(targetUrl) : targetUrl);
	return;
}
adObjzti.oobClkTrk = function() {
	if(this.link_m) {
		_ipGObjzti.util.loadTrk(this.link_m+"?");
	}
}
adObjzti.handleFlashClickThru = function() {
	this.oobClkTrk();
}
adObjzti.ipoll_fexp = function() { 
	_ipGObjzti.util.swImpTrk(this,this.a,this.c,11,10);
	this.startTimeSpent(1);
	return; 
}
adObjzti.ipoll_fcol = function() { 	
	this.stopTimeSpent(1);
	return; 
}
// ------- End Load and Utils Functions ------

// ------- Begin Time Spent ------
adObjzti.tIncrement = 0;
adObjzti.startTime = [0,0,0];
adObjzti.stopTime = [0,0,0];
adObjzti.uniqTS = [true, true, true];
adObjzti.onState = [false, false, false];
adObjzti.ipGetTime = function(type) {
	var now = new Date();
	return Date.UTC(now.getFullYear(),now.getMonth(),now.getDate(),now.getHours(),now.getMinutes(),now.getSeconds(),now.getMilliseconds());
}
adObjzti.startDuration = function() {
	if (this.disableTS) return;
	this.bucket = (this.tIncrement==0?Math.pow(2,this.tIncrement):Math.pow(2,this.tIncrement)-Math.pow(2,this.tIncrement-1));
	setTimeout(this.adInstStr+".stopDuration()",this.bucket*1000);
}
adObjzti.stopDuration = function() {
	if (this.disableTS) return;
	try {
		if (_ipGObjzti.util.getObj(this.envDivName)==null || this.tIncrement>17) return;
		_ipGObjzti.util.loadTrk(_ipGObjzti.util.hsDom+"ts1.poll?a="+this.a+"&c="+this.c+"&p="+this.panelNo+"&uid="+this.rndStr+"&ts="+this.ipTimeStamp+"&b="+this.bucket+"&rndStr="+Math.floor(Math.random()*10000000000000));
		this.tIncrement++;
		this.startDuration();
	} catch(e) {}
}
adObjzti.startTimeSpent = function(tstype) {
	if (this.disableTS) return;
	if (this.onState[tstype]) return;
	this.onState[tstype]=true;
	this.startTime[tstype]=this.ipGetTime();
}
adObjzti.stopTimeSpent = function(tstype) {
	if (this.disableTS) return;
	if (!this.onState[tstype] || _ipGObjzti.util.getObj(this.envDivName)==null) return;
	this.onState[tstype]=false;
	this.stopTime[tstype]=this.ipGetTime();
	var tDiff = this.stopTime[tstype]-this.startTime[tstype];
	if (tDiff>300 && tDiff<86400001) {
		_ipGObjzti.util.loadTrk(_ipGObjzti.util.hsDom+"ts"+(tstype+2)+".poll?a="+this.a+"&c="+this.c+"&p="+this.panelNo+"&uid="+this.rndStr+"&ts="+this.ipTimeStamp+"&tstart="+this.startTime[tstype]+"&tstop="+this.stopTime[tstype]+"&tdiff="+tDiff+"&rndStr="+Math.floor(Math.random()*10000000000000));
		if(this.uniqTS[tstype]) {
			_ipGObjzti.util.loadTrk(_ipGObjzti.util.hsDom+"ts"+(tstype+2)+".poll?a="+this.a+"&c="+this.c+"&p="+this.panelNo+"&uid="+this.rndStr+"&ts="+this.ipTimeStamp+"&tstart="+this.startTime[tstype]+"&tstop="+this.stopTime[tstype]+"&tdiff=u&rndStr="+Math.floor(Math.random()*10000000000000));
			this.uniqTS[tstype]=false;
		}
	}
}
// ------- End Time Spent ------

// ------- Begin replStr -------
adObjzti.replStr = ""
	+ "<div"
		+ " id=\""+adObjzti.replDivName+"\""
		+ " name=\""+adObjzti.replDivName+"\""
		+ " onmouseover=\""+adObjzti.adInstStr+".checkMouse(event,this);\""
		+ " onmouseout=\""+adObjzti.adInstStr+".checkMouse(event,this);\""
		+ " style=\""
			+ " display:block;"
			+ " position:relative;"
			+ " width:"+adObjzti.envSize[0]+"px;"
			+ " height:"+adObjzti.envSize[1]+"px;"
			+ " z-index:2;"
			+ " background-color:transparent;"
			+ " border:none!important;\""
		+ " >"
		+ "<a onclick=\""+adObjzti.adInstStr+".replClick('"+adObjzti.replClickEvent+"','"+adObjzti.i+"','"+adObjzti.targeturl+"');\">"
			+ "<img style=\""+adObjzti.imgSty+"cursor:pointer;\" src=\""+_ipGObjzti.util.crUrl+adObjzti.replPath+"\" width="+adObjzti.envSize[0]+" height="+adObjzti.envSize[1]+" border=0>"
		+ "</a>"
	+ "</div>"; 
// ------- End replStr -------

// ------- Begin outStr -------
if (typeof(adObjzti.es2) === "undefined") adObjzti.es2 = ""; if (adObjzti.es2 !== "" && adObjzti.es2.toLowerCase().substring(0,7) === "http://") { adObjzti.es2 = "<img style=\""+adObjzti.imgSty+"\" src=\""+adObjzti.es2+adObjzti.rndStr+"\" width=1 height=1 border=0>"; } else { adObjzti.es2 = ""; }
if (typeof(adObjzti.es) === "undefined") adObjzti.es = ""; if (adObjzti.es !== "" && adObjzti.es.toLowerCase().substring(0,7) === "http://") { adObjzti.es = "<img style=\""+adObjzti.imgSty+"\" src=\""+adObjzti.es+adObjzti.rndStr+"\" width=1 height=1 border=0>"; } else { adObjzti.es = ""; }
adObjzti.outStr=""
	+ "<div"
		+ " id=\""+adObjzti.envDivName+"\""
		+ " name=\""+adObjzti.envDivName+"\""
		+ " onmouseover=\""+adObjzti.adInstStr+".checkMouse(event,this);\""
		+ " onmouseout=\""+adObjzti.adInstStr+".checkMouse(event,this);\""
		+ " style=\""
			+ " display : block;"
			+ " position : relative;" 
			+ " width : "+adObjzti.envSize[0]+"px;"
			+ " height : "+adObjzti.envSize[1]+"px;"
			+ " z-index : 1;"
			+ " padding : 0;"
			+ " background-color : transparent;"
			+ " border : none!important;"
			+ (adObjzti.marginAuto ? "margin:auto;" : "")
			+ (adObjzti.envSty ? adObjzti.envSty : "")
		+ "\""
	+ ">";
adObjzti.outStr += ""
	+ " <div"
		+ " id=\""+adObjzti.impDivName+"\""
		+ " style=\"z-index:0;width:1px;height:1px;top:0px;left:0px;visibility:hidden;position:absolute;overflow:hidden;\">"
		+ adObjzti.es
		+ adObjzti.es2
		+ "<img style=\""+adObjzti.imgSty+"\" src=\""+_ipGObjzti.util.hsDom+"imprimage.poll?a="+adObjzti.a+"&c="+adObjzti.c+"&p="+adObjzti.panelNo+"&t=9&i=0&rnd="+adObjzti.rndStr+"\" width=1 height=1 border=0>"
	+ " </div>";
if (_ipGObjzti.browser.is_valid) { 
	adObjzti.outStr+=_ipGObjzti.util.dispFlash([adObjzti.flashSource,adObjzti.flashTarget,adObjzti.envSize[0],adObjzti.envSize[1],adObjzti.flashName,adObjzti.imgSty]); 
} else { 
	adObjzti.outStr+=adObjzti.replStr; 
}
adObjzti.outStr+="</div>";
// ------- End outStr -------

// ------- Output Unit -------
_ipGObjzti.util.displayUnit(adObjzti);
adObjzti.delayLoadTimer();
adObjzti.ipTimeStamp = adObjzti.ipGetTime();
adObjzti.startDuration();


